const HtmlPlugin = require('html-webpack-plugin');
const htmlPlugin = new HtmlPlugin({
    template: __dirname + '/src/index.html',
    fileName: 'index.html'
});
module.exports = {
    "mode": "development",
    plugins: [htmlPlugin],
    module: {
        rules: [{ test: /\.(js|jsx)$/, use: 'babel-loader', exclude: /node_modules/ },
        { test: /\.css/, use: ['style-loader', 'css-loader'] },
        { test: /\.scss/, use: ['style-loader', 'css-loader?modules&localIdentName=[path][local]-[name]-[hash:5]', 'sass-loader'] }
        ]
    },
    resolve: {
        extensions: ['.js', '.jsx', '.json'],
        alias: {
            '@': __dirname + '/src'
        }
    }
}